<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="sitemesh" uri="http://www.opensymphony.com/sitemesh/decorator" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>


<div class="panel_container">

    <div class="panel">
        <form id="form_search">
            <div class="panel_header">
                <div><h2>业务日志查询</h2></div>
            </div>

            <div class="panel_body">
                <div>
                    <div class="info_item"><span>业务日志开始时间</span><input type="text" name="startDate" maxlength="10" id="startDate"/></div>
                    <div class="info_item"><span>业务日志结束时间</span><input type="text" name="endDate" maxlength="10" id="endDate"/></div>
                </div>
            </div>

            <div class="panel_footer">
                <div>
                    <input type="button" value="查询" class="btn_blue" id="btn_search"/>
                </div>
            </div>
        </form>
    </div>

    <div class="panel">
        <div class="panel_body">
            <div>
                <table id="grid_tbl"></table>
                <div id="pager"></div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function refreshList(){
        $("#grid_tbl").jqGrid('setGridParam',{postData:$("#form_search").serializeObject()}).trigger("reloadGrid");
    }

    $(function () {

        $('#startDate').datepicker();
        $('#endDate').datepicker();


        $("#btn_search").click(function(){
            refreshList();
        });

        $("#grid_tbl").jqGrid({
            datatype: "json",
            mtype: "POST",
            url : "${ctx}/businessLog/businessLogList",
            postData:$("#form_search").serializeObject(),
            width:"100%",
            height:"100%",
            colNames: ['业务类型', '操作者','操作类型','操作时间','操作状态','操作结果','userIp'],
            colModel: [
                {name: 'businessType', index: 'businessType'},
                {name: 'userName', index: 'userName'},
                {name: 'operationType', index: 'operationType'},
                {name: 'operationTime', index: 'operationTime'},
                {name: 'operationStatus', index: 'operationStatus'},
                {name: 'operationDesc', index: 'operationDesc'},
                {name: 'userIp', index: 'userIp'}
            ],

            rowNum: 10,
            rowList:[10,20,30],
            pager: '#pager',
            imgpath: 'images',
            sortname: 'updateDate',
            viewrecords: true,
            sortorder: "desc",
            autowidth:true,
            jsonReader: {
                repeatitems : false,
                id: "id"
            },
            caption: "业务日志查询结果列表"
        });
    });

</script>